package com.lemon.blog.system.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lemon.common.core.annotation.Excel;
import com.lemon.common.core.serializer.JsonLongDeserializer;
import com.lemon.common.core.serializer.JsonLongSerializer;
import com.lemon.common.core.base.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 博客管理对象 bl_blog
 * 
 * @author huangpeng
 * @date 2022-04-25
 */
public class BlBlog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 帖子id */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long id;

    /** 标题 */
    @Excel(name = "标题")
    private String blogTitle;

    /** 封面 */
    private String blogImage;

    /** 帖子内容 */
    @Excel(name = "帖子内容")
    private String blogContent;

    /** 点赞数 */
    @Excel(name = "点赞数")
    private Long blogGoods;

    /** 阅读数 */
    @Excel(name = "阅读数")
    private Long blogRead;

    /** 收藏数 */
    @Excel(name = "收藏数")
    private Long blogCollection;

    /** 博客分类 */
    @Excel(name = "博客分类")
    private String blogType;

    /** 简介 */
    @Excel(name = "简介")
    private String blogRemark;

    /** 评论数 */
    @Excel(name = "评论数")
    private Long blogComment;

    /** 推荐等级 */
    @Excel(name = "推荐等级")
    private String blogRecommend;

    /** 文章来源 */
    @Excel(name = "文章来源")
    private String blogSource;

    /** 是否评论 */
    @Excel(name = "是否评论")
    private String commentOpen;

    /** 是否原创 */
    @Excel(name = "是否原创")
    private String original;

    /** 文章状态, 1已发布0草稿 */
    @Excel(name = "文章状态")
    private String status;

    /** 乐观锁 */
    private Long version;

    /** 是否删除 */
    private String delFlag;

    /**
     * 管理员id
     */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long adminId;

    /**
     * 创作者用户id
     */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long userId;

    /**
     * 封面文件id
     */
    @Excel(name = "封面文件id")
    private String coverFileId;

    /**
     * 文章添加类型：0后台添加，1用户投稿
     */
    @Excel(name = "文章添加类型：0后台添加，1用户投稿")
    private String blogJoinType;

    /**
     * 文章分类名称
     */
    private String typeName;

    /**
     * 标签列表
     */
    private List<BlTag> tagList;

    /**
     * 审核状态，对应数据字典sys_approval_status
     */
    @Excel(name = "复核状态")
    private String approvalStatus;

    public BlBlog() {}

    public BlBlog(Long id) {
        this.id = id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setBlogTitle(String blogTitle) 
    {
        this.blogTitle = blogTitle;
    }

    public String getBlogTitle() 
    {
        return blogTitle;
    }
    public void setBlogImage(String blogImage) 
    {
        this.blogImage = blogImage;
    }

    public String getBlogImage() 
    {
        return blogImage;
    }
    public void setBlogContent(String blogContent) 
    {
        this.blogContent = blogContent;
    }

    public String getBlogContent() 
    {
        return blogContent;
    }
    public void setBlogGoods(Long blogGoods) 
    {
        this.blogGoods = blogGoods;
    }

    public Long getBlogGoods() 
    {
        return blogGoods;
    }
    public void setBlogRead(Long blogRead) 
    {
        this.blogRead = blogRead;
    }

    public Long getBlogRead() 
    {
        return blogRead;
    }
    public void setBlogCollection(Long blogCollection) 
    {
        this.blogCollection = blogCollection;
    }

    public Long getBlogCollection() 
    {
        return blogCollection;
    }
    public void setBlogType(String blogType)
    {
        this.blogType = blogType;
    }

    public String getBlogType()
    {
        return blogType;
    }
    public void setBlogRemark(String blogRemark) 
    {
        this.blogRemark = blogRemark;
    }

    public String getBlogRemark() 
    {
        return blogRemark;
    }
    public void setBlogComment(Long blogComment) 
    {
        this.blogComment = blogComment;
    }

    public Long getBlogComment() 
    {
        return blogComment;
    }
    public void setBlogRecommend(String blogRecommend) 
    {
        this.blogRecommend = blogRecommend;
    }

    public String getBlogRecommend() 
    {
        return blogRecommend;
    }
    public void setBlogSource(String blogSource) 
    {
        this.blogSource = blogSource;
    }

    public String getBlogSource() 
    {
        return blogSource;
    }
    public void setCommentOpen(String commentOpen) 
    {
        this.commentOpen = commentOpen;
    }

    public String getCommentOpen() 
    {
        return commentOpen;
    }
    public void setOriginal(String original) 
    {
        this.original = original;
    }

    public String getOriginal() 
    {
        return original;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public List<BlTag> getTagList() {
        return tagList;
    }

    public void setTagList(List<BlTag> tagList) {
        this.tagList = tagList;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getCoverFileId() {
        return coverFileId;
    }

    public void setCoverFileId(String coverFileId) {
        this.coverFileId = coverFileId;
    }

    public String getBlogJoinType() {
        return blogJoinType;
    }

    public void setBlogJoinType(String blogJoinType) {
        this.blogJoinType = blogJoinType;
    }

    public String getApprovalStatus() {
        return approvalStatus;
    }

    public void setApprovalStatus(String approvalStatus) {
        this.approvalStatus = approvalStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("blogId", getId())
            .append("blogTitle", getBlogTitle())
            .append("blogImage", getBlogImage())
            .append("blogContent", getBlogContent())
            .append("blogGoods", getBlogGoods())
            .append("blogRead", getBlogRead())
            .append("blogCollection", getBlogCollection())
            .append("blogType", getBlogType())
            .append("blogRemark", getBlogRemark())
            .append("blogComment", getBlogComment())
            .append("blogRecommend", getBlogRecommend())
            .append("blogSource", getBlogSource())
            .append("commentOpen", getCommentOpen())
            .append("original", getOriginal())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .append("adminId", getAdminId())
            .append("userId", getUserId())
            .toString();
    }
}
